package com.woniu.airent.controller;

import com.woniu.airent.entity.Extra;
import com.woniu.airent.service.ExreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("extra")
public class ExreaController {
    @Autowired
    ExreaService exreaService;

    @RequestMapping("/showHouseExtra")
    @ResponseBody
    public List<Extra> showHourseExtra(){
        List<Extra> extraList = exreaService.showAllExtra();
        System.out.println(extraList);
        return extraList;
    }
}
